home *** CD-ROM | disk | FTP | other *** search
- Path: jpmorgan.com!usenet
- From: Joe Borkoles <jborkole@jpmorgan.com>
- Newsgroups: comp.lang.c++,comp.lang.object,comp.lang.eiffel,comp.lang.smalltalk
- Subject: programming language sensitive design
- Date: Fri, 29 Mar 1996 14:35:44 +0000
- Organization: JP Morgan
- Message-ID: <315BF540.2781E494@jpmorgan.com>
- NNTP-Posting-Host: gd-dba7.uk.jpmorgan.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0 (X11; I; SunOS 4.1.3_U1 sun4m)
-
- In an informal presentation by a relatively high level patterns luminary the audience was asked to write the C++ code for
- a OrderSet, implmented in terms of a binary tree. The OSet member functions were provided but nothing else. The exersise
- was of course about recognising and using a pattern. Everyone used a basic varient of a simple node class and a OSet
- class. However by using the composite pattern a different design resulted. There were 3 node classes, EmptyNode,
- BranchNode and LeafNode. Inserting to an empty node created a new LeafNode, inserting to a LeafNode created a BranchNode
- and added itself to the branch. This is quite neat. The statement was made that the author of the design would have
- choosen to use this design in a Smalltalk environment and not in a C++ one. At this point I had to ask why. He was very
- evasive and didn't wish to answer. Howevever we reached somekind of agreement that the traditional C++ development
- community would be 'more' comfortable with the traditional design. ie there was no technical reason, only a social one.
- Any thoughts on this. I was actually quite disturbed by it.
-